<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>响应式-API</title>
  </head>
  <body>
    <div id="app"></div>
    <script src="../lib/vue.global.js"></script>
    <script>
      Vue.createApp({
        data() {
          return {
            count: 0,
          };
        },
        mounted() {
          console.log("1", this);
          console.log("2-1", this.count);
          console.log("2-2", this.$data.count);

          this.count = 520;
          console.log("3-1", this.count);
          console.log("3-2", this.$data.count);

          this.$data.count = 300;
          console.log("4-1", this.count);
          console.log("4-2", this.$data.count);

          this._.data.count = 400;
          console.log("5-1", this.count);
          console.log("5-2", this.$data.count);

          console.log(this.count === this.$data.count);
          console.log(this.count === this.$.data.count);
          console.log(this.count === this._.data.count);
        },
      }).mount("#app");
    </script>
  </body>
</html>
